Imports System.Web

Public Class Utente
    Inherits Connessione

    Private _IdUt As String
    Private _login As String
    Private _psw As String

    Public Property IdUt() As String
        Get
            Return _IdUt
        End Get
        Set(ByVal Value As String)
            _IdUt = Value
        End Set
    End Property

    Public Property login() As String
        Get
            Return _login
        End Get
        Set(ByVal Value As String)
            _login = Value
        End Set
    End Property
    Public Property psw() As String
        Get
            Return _psw
        End Get
        Set(ByVal Value As String)
            _psw = Value
        End Set
    End Property

    Public Function carica()
    End Function
End Class

Public Class Utenti
    Inherits Connessione

    Private _ut As Utente

    Public Sub New(Optional ByVal newInstance As Boolean = False)

        If (HttpContext.Current.Session("UTENTE") Is Nothing Or newInstance) Then
            ' new instance here ;)
            _ut = New Utente
            HttpContext.Current.Session("UTENTE") = _ut
        Else
            _ut = HttpContext.Current.Session("UTENTE")
        End If
    End Sub


    Public Property Utente() As Utente
        Get
            Return _ut
        End Get
        Set(ByVal Value As Utente)
            _ut = Value
        End Set
    End Property


End Class
